﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shop.Home.Models;
using PetaPoco;

namespace Shop.Home.Repositories
{
    public class WaresPictureAccess
    {
        private Database DB = new Database("ConnString");
        /// <summary>
        /// 根据type获取信息
        /// </summary>
        /// <param name="Type"></param>
        /// <returns></returns>
        public IList<Models.WaresPicture> GetWPInfo(int Type)
        {
            Sql sql = Sql.Builder.Append("select * from Shop_HomePictures where Type = @0 order by OrderTime desc", Type);
            return DB.Fetch<WaresPicture>(sql);
        }
    }
}
